package com.lock.subscribe.util;

/**
 * @author kinfeng
 * @date 2018/11/22 11:26 AM
 * @desc
 */
public class Result<T extends Object> {
    /** 错误码. */
    private Integer code;

    /** 提示信息. */
    private String msg;

    /** 具体的内容. */
    private T data;
    private Integer pitNum;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public Integer getPitNum() {
		return pitNum;
	}

	public void setPitNum(Integer pitNum) {
		this.pitNum = pitNum;
	}

	public Result(Integer code, String msg, T data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }
//    public Result(Integer code, String msg, T data,Integer pitNum) {
//        this.code = code;
//        this.msg = msg;
//        this.data = data;
//        this.pitNum = pitNum;
//    }
    public Result(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
        this.data=null;
    }

    public Result() {
        super();
    }

    @Override
    public String toString() {
        return "Result{" +
                "code=" + code +
                ", msg='" + msg + '\'' +
                ", pitNum='" + pitNum + '\'' +
                ", data=" + data +
                '}';
    }
}
